Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.social.user.activity.stream.gadgets

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.social.user.activity.stream.gadgets" version="1.0">

  <extension target="org.nuxeo.opensocial.gadgets.service" point="gadget">

    <internalGadget name="useractivitystream" disabled="false">
      <documentation>
        This gadget displays the activities of a user, or the activities
        of the user's network.

        The following user preferences can be used to configure it:
        - activityLinkBuilder: activity link builder name to use to generate
          documents and user URLs
        - activityStreamType: can be 'forActor' to display the activities of
          the user's network, or 'fromActor' to display only the user activities.
        - actor: the actor for which to display the activities,
          default is the current user username.

        How to include the useractivitystream gadget in a JSF context:
        <code>
          <div class="gadget-useractivitystream threeQuarterWidth"></div>
          <script type="text/javascript">
            jQuery('.gadget-useractivitystream').openSocialGadget({
              baseURL: '#{baseURL}',
              language: '#{localeSelector.language}',
              gadgetDefs: [
                { specUrl: '#{gadgetsBaseURL}/site/gadgets/useractivitystream/useractivitystream.xml',
                  title: '',
                  userPrefs: {
                    activityLinkBuilder: {
                      value: 'default'
                    },
                    activityStreamType: {
                      value: 'forActor'
                    }
                  },
                  displayTitleBar: false,
                  width: '100%'
                }
              ]
            });
          </script>
        </code>

        How to include the useractivitystream gadget in a WebEngine page:
        <code>
          <link rel="stylesheet" href="${contextPath}/css/opensocial/light-container-gadgets.css" />
          <script type="text/javascript" src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1"></script>
          <script type="text/javascript" src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js"></script>

          <div class="gadget-useractivitystream gadgets-gadget-chrome"></div>
          <script type="text/javascript">
            $('.gadget-useractivitystream').openSocialGadget({
              baseURL: '${contextPath}' + '/',
              language: '${Context.locale.language}',
              gadgetDefs: [{
                specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/useractivitystream/useractivitystream.xml',
                userPrefs: {
                  activityLinkBuilder: {
                    value: 'default'
                  },
                  activityStreamType: {
                    value: 'forActor'
                  }
                },
                displayTitleBar: false,
                width: '100%'
              }]
            });
          </script>
        </code>
      </documentation>

      <mountPoint>/useractivitystream</mountPoint>
      <entryPoint>useractivitystream.xml</entryPoint>
      <category>Nuxeo</category>
      <icon>gadget-useractivitystream.png</icon>
    </internalGadget>

  </extension>

</component>